<template>
	<view>
		<view>
			<text class="content">{{content}}</text>

		</view>
		
		<view  hover-class="submitColor" class="btn" style="width: 100px;height: 40px; color: #000000;">获取数据</view>
	</view>

</template>

<script>
	import Request from "../../api/request.js"
	export default {
		data() {
			return {
				content: '你好'
			}
		},
		onLoad() {
         console.log("111111111",this.$router);
		},
		methods: {
			
			startPage(){
				uni.navigateTo({
					url:"../detail/detail?id=100"
				})
			},
			  getData ( ) {
			//  try
			//   {
			// 	  const res = await this.$getData ({
				  
			// 	      url: this.$apis.loginUrl().url
				  
			// 	  })
				  		
			// 	     console.log(res)
				  
			// }
			// catch(Exception e){
			// 	  console.log("eee： "+e);
			//  console.log("url: "+this.$api.getChanPingUrl().url)
			this.$getData({
				url: this.$apis.loginUrl().url
			}).then(function(res){
				console.log("ddd; "+res);
			}).catch(function(error){
				console.log("3333: "+error);
			})
			
			},
		 async	getdata2(){
				try{
					  const res = await this.$getData ({
					      url: this.$apis.loginUrl().url,
						  data:{page:1}
					  })	
					console.log("res"+res);  
				}catch(e){
					console.log("eee: "+e);
				}
			}
         
     		
		}
	}
</script>

<style>
	.content {
		padding: 20px;
		word-wrap: break-word;
		word-break: break-all;
		font-weight: bold;
		display: flex;
		margin-top: 20px;
		justify-content: center;
		
	}

	.btn {
		margin: 20px;
		color: #FFFFFF;
		display: flex;
		height: 40px;
		font-size: 15px;
		justify-content: center;
		align-items: center;
	}

	.submitColor {
		color: #FFFFFF;
		background: red;
	}
</style>
